import React, { Component } from 'react';
import { connect } from 'dva';
import TabsChart from './components/TabsChart';
/**
 * 现金流分析
 */
class CashFlow extends Component {
  componentDidMount() {
    const { dispatch } = this.props;
    dispatch({
      type: 'finance/getCharts',
      payload: {
        dataType: 'CashFlow',
        descKey: 'xj',
      },
    });
  }

  render() {
    const tabs = [
      {
        tab: '销售商品提供劳务收到的现金/营业收入',
        key: 0,
      },
      {
        tab: '购买商品接受劳务支付的现金/营业成本',
        key: 1,
      },
      {
        tab: '经营活动产生现金流量净额/营业收入',
        key: 2,
      },
      {
        tab: '经营活动产生现金流量净额/营业利润',
        key: 3,
      },
    ];
    return <TabsChart tabs={tabs} />;
  }
}

export default connect()(CashFlow);
